﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SevenZSharp;
using System.Threading;
using System.IO;

namespace PhoneNumberFinder
{
    class Program
    {
        static void Main(string[] args)
        {
            string fileName1 = @"C:\Users\sun\Documents\Tencent Files\672380679\FileRecv\test\test.txt";
            string fileName2=fileName1+".7z";
            string fileName3 = fileName1 + ".txt";
            int i = 0;
            ThreadPool.QueueUserWorkItem(new WaitCallback(delegate(object obj) {
                Console.WriteLine("准备读");
                string[] numbers = File.ReadAllLines(fileName1);
                Console.WriteLine("读ok");
                foreach (string num in numbers)
                {
                    if (num.IndexOf("1988") > 0)
                        Console.WriteLine(num);
                    else {
                        Console.WriteLine(i++);
                    }
                }
                Console.WriteLine("ok");
            }));
            Console.WriteLine("开始");
            CompressionEngine.Current.Encoder.EncodeSingleFile(fileName1, fileName2);
            //CompressionEngine.Current.Decoder.DecodeSingleFile(fileName2, fileName3);
            Console.ReadKey();
        }
    }
}
